<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use dosamigos\datetimepicker\DateTimePicker;

/* @var $this yii\web\View */
/* @var $model backend\models\CommentsRelation */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="comments-relation-search">

    <?php
    \Yii::$container->set(\yii\widgets\ActiveField::className(), ['template' => "{label}\n{input}\n{hint}"]);
    $form = ActiveForm::begin([
        'action' => ['index'],
        'method' => 'get',
        'options' => ['class' => 'form-inline'],
    ]); ?>

    <?php  echo $form->field($model, 'bestry_uid') ?>

    <?= $form->field($model, 'goods_name') ?>

    <?php  echo $form->field($model, 'level')->dropDownList(\common\models\CommentsRelation::$LEVEL) ?>

    <?php  //echo $form->field($model, 'is_try')->dropDownList(\common\models\CommentsRelation::$IS_TRY) ?>

    <?php  echo $form->field($model, 'status')->dropDownList(\common\models\CommentsRelation::$STATUS) ?>

    <?php  echo $form->field($model, 'is_show')->dropDownList(\common\models\CommentsRelation::$IS_SHOW) ?>

    <?= $form->field($model, 'flag')->dropDownList(\common\models\CommentsRelation::$FLAG)?>
    <br><br>

    <?= $form->field($model, 'start_time')->widget(DateTimePicker::className(),
        [
            'template'=>"{input}{reset}{button}",
            'clientOptions' => [
                'autoclose' => true,
                'linkFormat' => 'yyyy-MM-dd', // if inline = true
                'format' => 'yyyy-mm-dd', // if inline = false
                'todayBtn' => true,
                'pickerPosition'=>"bottom-left",
                'language'=>'zh-CN',
                'minView'=>'month'
            ]
        ])?>
    -
    <?= $form->field($model, 'end_time')->widget(DateTimePicker::className(),
        [
            'template'=>"{input}{reset}{button}",
            'clientOptions' => [
                'autoclose' => true,
                //'linkFormat' => 'yyyy-MM-dd', // if inline = true
                'format' => 'yyyy-mm-dd', // if inline = false
                'todayBtn' => true,
                'pickerPosition'=>"bottom-left",
                'language'=>'zh-CN',
                'minView'=>'month'
            ]
        ])?>


    <?php // echo $form->field($model, 'is_reply') ?>

    <?php // echo $form->field($model, 'reply_id') ?>


    <div class="form-group">
        <?= Html::submitButton('搜索', ['class' => 'btn btn-primary']) ?>
    </div>
    <?= Html::a('创建评论', ['create'], ['class' => 'btn btn-success']) ?>
    <?php ActiveForm::end(); ?>

</div>
